{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-btn-group">
            <a href="{:url('user/hook/add')}" data-width="440px" data-height="260px" class="layui-btn ajax-iframe"><i class="fa fa-plus-circle"></i> 新增</a>
        </div>
        <table class="layui-table layui-form" lay-filter="demo">
            <thead>
                <tr>
                    <th>分组标识</th>
                    <th>名称</th>
                    <th>参数列表</th>
                    <th>当前状态</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {foreach name="list" item="v" empty="$empty"}
                <tr>
                    <td>{:get_select('hook_group',$v.group)}</td>
                    <td>{$v.name}</td>
                    <td>{}</td>
                    <td><input type="checkbox" name="status" lay-skin="switch" lay-filter="*" lay-text="正常|禁用" data-url="{:url('user/hook/edit', ['id' => $v.id])}" {if $v.status eq 1}checked="checked" {/if}></td>
                    <td>
                        <a href="{:url('user/hook/edit', ['id' => $v.id])}" data-width="440px" data-height="260px" class="layui-btn layui-btn-xs layui-btn-normal ajax-iframe"><i class="fa fa-edit"></i> 编辑</a>
                        <a href="{:url('user/hook/del', ['id' => $v.id])}" class="layui-btn layui-btn-xs layui-btn-danger ajax-delete"><i class="fa fa-trash-o"></i> 删除</a>
                    </td>
                </tr>
                {/foreach}
            </tbody>
        </table>
        <div class="page">{$list->render()}</div>
    </div>
</div>
{/block}